package com.gyg.client;

import com.gyg.returns.RespEntity;
import com.gyg.vo.param.CollectionParam;
import com.gyg.vo.param.UpdateCollectionParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "cloudCollectionClient", url = "${cloud.box.url}")
public interface CloudCollectionClient {

    /**
     * 添加收藏
     * @param collectionParam
     * @return
     */
    @PostMapping("/cloud-collection/add")
    RespEntity addCollection(@RequestBody CollectionParam collectionParam);

    /**
     * 收藏列表
     * @param userId
     * @return
     */
    @GetMapping("/cloud-collection/list")
    RespEntity collectionList(@RequestParam(value = "userId") Integer userId);

    /**
     * 编辑文件收藏信息
     * @param updateCollectionParam
     * @return
     */
    @PutMapping("/cloud-collection/update")
    RespEntity updateCollection(@RequestBody UpdateCollectionParam updateCollectionParam);

    /**
     * 取消收藏
     * @param collectionParam
     * @return
     */
    @DeleteMapping("/cloud-collection/cancel")
    RespEntity cancelCollection(@RequestBody CollectionParam collectionParam);

}
